package pei.lei.lostandfound.entity;


import javax.persistence.*;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * <p>
 * 
 * </p>
 *
 * @author Zhang
 * @since 2021-01-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="notice")
public class Notice {



    /**
     * 失物招领订单id
     */
    
        @Id
        @Column(name = "notice_id")
        @GeneratedValue(strategy=GenerationType.IDENTITY)
        @ApiModelProperty(value = "公告id，唯一，不填",name = "noticeId",dataType = "string")
                private Integer noticeId;

    /**
     * 发布的用户id
     */
    @Column(name = "user_id")
    @ApiModelProperty(value = "用户id",name = "userId",dataType = "string")
        private String userId;

    /**
     * 订单类型，0是失物，1是拾物
     */
    @Column(name = "order_type")
    @ApiModelProperty(value = "公告类型，0是失物，1是拾物",name = "orderType",dataType = "string")
        private String orderType;

    /**
     * 东西捡到的位置
     */
    @Column(name = "address")
    @ApiModelProperty(value = "东西捡到的位置",name = "address",dataType = "string")
        private String address;

    /**
     * 东西名字
     */
    @Column(name = "thing_name")
    @ApiModelProperty(value = "东西名字",name = "thingName",dataType = "string")
        private String thingName;

    /**
     * 联系方式
     */
    @Column(name = "callphone")
    @ApiModelProperty(value = "联系方式",name = "callphone",dataType = "string")
    private String callphone;

    /**
     * 信息详情
     */
    @Column(name = "order_message")
    @ApiModelProperty(value = "公告详情",name = "orderMessage",dataType = "string")
        private String orderMessage;

    /**
     * 上传的图片的url
     */
    @Column(name = "file_url")
    @ApiModelProperty(value = "上传的图片的url,不填",name = "fileUrl",dataType = "string")
        private String fileUrl;

    /**
     * 创建时间
     */
    @Column(name = "creat_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty(value = "创建时间，不填",name = "creatTime",dataType = "date")
        private Date creatTime;

    /**
     * 状态码，0是发布，1是举报，2已解决,3下架
     */
    @Column(name = "state")
    @ApiModelProperty(value = "公告状态码，0是发布，1是举报，2已解决,3下架，不填",name = "state",dataType = "string")
        private String state;


}


